// TempleteConstant.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream.h>

template <class  T>
T min2(const T* arry, int size)
{
	T min_val = arry[0];
	for(int i=0; i<size; i++)
	{
		if(arry[i] < min_val)
		{
			min_val = arry[i];
		}
	}
	return min_val;
}

void main()
{
	int ai[] = {12, 8, 73, 45};
     int* ap = ai;
	cout << min2(ap, sizeof(ai)/sizeof(ai[0])) << endl;;
}


